<%
  value_format = ''
  if ['>t-', '<t-', 't-', '<t+', '>t+', 't+'].include? selected_operator
    value_format = 'days'
  elsif selected_operator == '=d'
    value_format = 'on-date'
  elsif selected_operator == '<>d'
    value_format = 'between-dates'
  end
%>
<div class="advanced-filters--filter-value <%= value_visibility %> <%= value_format %>">
  <%= render partial: 'projects/filters/date/days',
             locals: { filter: filter,
                       value: value_format == 'days' ? filter.values.first : '' } %>
  <%= render partial: 'projects/filters/date/on_date',
             locals: { filter: filter,
                       value: value_format == 'on-date' ? filter.values.first : '' } %>
  <%= render partial: 'projects/filters/date/between_dates',
             locals: { filter: filter,
                       from_value: value_format == 'between-dates' ? filter.values.first : '',
                       to_value: value_format == 'between-dates' ? filter.values.second : ''} %>
</div>
